<?php

namespace App\Admin\Controllers;

use App\Admin\Metrics\Examples;
use App\Http\Controllers\Controller;
use Dcat\Admin\Layout\Column;
use Dcat\Admin\Layout\Content;
use Dcat\Admin\Layout\Row;
use Illuminate\Support\Facades\Storage;
use App\Admin\Metrics\Examples\TotalPhones;
use App\Admin\Metrics\Examples\TotalTodayPhones;
use App\Admin\Metrics\Examples\TotalYestodayPhones;
use App\Admin\Metrics\Examples\TypePhones;
use App\Admin\Metrics\Examples\TypeTodayPhones;
use App\Admin\Metrics\Examples\TypeYestodayPhones;
use App\Admin\Metrics\Examples\TotalPhoneRepeat;

class HomeController extends Controller
{
    public function index(Content $content): Content
    {
        return $content
            ->header('数据统计')
            //->description('Description...')
            ->body(function (Row $row) {
                $row->column(6, function (Column $column) {
                    $column->row(new Examples\NewUsers());
                    $column->row(function (Row $row) {
                        $row->column(6, new Examples\TotalRegister());
                        $row->column(6, new Examples\Register());
                        $row->column(6, new Examples\TotalRecharge());
                        $row->column(6, new Examples\Recharge());
                        $row->column(6, new Examples\TodayRecharge());
                        $row->column(6, new Examples\TodayRechargeNumber());

                    });
                });
                $row->column(6, function (Column $column) {
                    //$column->row(new Examples\RechargeUsers());
                    $column->row(new Examples\NewShops());
                    $column->row(function (Row $row) {
                        $row->column(6, new Examples\TotalShop());
                        $row->column(6, new Examples\Shops());
                        $row->column(6, new Examples\TotalWithdraw());
                        $row->column(6, new Examples\Withdraw());

                        $row->column(6, new Examples\TotalProfit());
                        $row->column(6, new Examples\Profit());
                    });
                });




            });

    }
}
